<!-- header for each page to include -->

<html>
<title><?php echo $title;?></title>

<?php if ($this->session->userdata('logged_in')): ?>

<p>Hello <?php echo $this->session->userdata('name'); ?></p>

<?php echo anchor('site','Home'); ?>
<?php if ($this->session->userdata('user_type') == 3): ?>
<?php echo anchor('admin/listuser','Users');?>
<?php endif;?>

<?php if ($this->session->userdata('user_type') == 1): ?>
<?php echo anchor('student/registeredTopic','Registered Topic');?>
<?php endif;?>

<?php if ($this->session->userdata('user_type') == 2): ?>
<?php echo anchor('teacher/mytopic','My topics'); ?>
<?php echo anchor('teacher/create','Create'); ?>
<?php endif;?>

<?php echo anchor('login/logout','Logout'); ?>
<?php echo anchor('site/about','About').'<br>'; ?>


<?php endif;?>
